package com.tn.tgt.easybuy.service;

import com.tn.tgt.easybuy.mapper.EbProductCategoryMapper;
import com.tn.tgt.easybuy.model.EbProductCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class EbProductCategoryServiceImpl implements EbProductCategoryService{
    @Autowired
    private EbProductCategoryMapper ebProductCategoryMapper;
    @Override
    public Map<String, List<EbProductCategory>> selectBigAndSmallCate() {
        List<EbProductCategory>bigCategory = ebProductCategoryMapper.selectBigCategory();
        List<EbProductCategory>smallCategory=ebProductCategoryMapper.selectSmallCategory();
         Map<String,List<EbProductCategory>>categoryMap = new HashMap();
         categoryMap.put("big",bigCategory);
         categoryMap.put("small",smallCategory);
        return categoryMap;
    }
}
